package com.demo.spring.event;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class App {

	public static void main(String[] args) {
        // 用我们的配置文件来启动一个 ApplicationContext
		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext("com.demo.spring.event");
        System.out.println("context 启动成功");
        
        MyApplicationEventPublisherAware myApplicationEventPublisherAware = context.getBean(MyApplicationEventPublisherAware.class);
        myApplicationEventPublisherAware.register(new User(1, "zsl", "1234567890", "youtong82@163.com"));
    }

}
